/*
 *  Copyright (c) 2013.
 *  * 游戏服务器核心代码编写人陈磊拥有使用权
 *  * 联系方式：E-mail:13638363871@163.com ;qq:502959937
 *  * 个人博客主页：http://my.oschina.net/chenleijava
 */

package com.dc.gameserver.serverCore.controller.handleController.rewardController;

import com.dc.gameserver.proto.itemserverprotoVo.achiveFristRewardRequest;
import com.dc.gameserver.serverCore.controller.AbstractController.AbstractController;
import com.dc.gameserver.serverCore.controller.AbstractController.IController;
import com.dc.gameserver.serverCore.model.dbsql.modelCache.ModelCacheService;
import com.dc.gameserver.serverCore.service.character.PlayerInstance;
import com.google.protobuf.MessageLite;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 *  Created by 石头哥哥 on 13-12-23.
 *  关卡首次三星奖励领取
 *  修改关卡表中的firstStartRward字段为false ，表示已经领取奖励
 *
 */
@Service
public class achiveFristRewardController extends AbstractController {

    @Resource
    private ModelCacheService modelCacheService;

    @Override
    public void PostConstruct() {
        int ID= achiveFristRewardRequest.msgID.ID_VALUE;
        GAME_CONTROLLERS[ID]=this;
        IController.MESSAGE_LITE[ID]= achiveFristRewardRequest.getDefaultInstance();
    }

    /**
     * messageLite数据结构体分发
     *
     * @param messageLite 数据载体
     * @param player      active object
     * @throws Exception 注意messageLite应该递交给GC直接处理  ，set null
     */
    @Override
    public void DispatchMessageLit(MessageLite messageLite, PlayerInstance player) throws Exception {
        achiveFristRewardRequest achiveFristRewardRequest= (achiveFristRewardRequest) messageLite;
    }
}
